<%@page import="java.util.List"%>
<%@page import="java.util.HashMap"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@include file="../common/prama.jsp" %>
<%
	HashMap<String, Object> bModel =(HashMap<String, Object>)request.getAttribute("model");
	List<HashMap<String, Object>> infoDict = (List<HashMap<String, Object>>)request.getAttribute("infoDict");
	List<HashMap<String, Object>> bildDict = (List<HashMap<String, Object>>)request.getAttribute("bildDict");
	Object os = bModel.get("OS");
	String path = bModel.get("SMALLIMGURL")+"";
	if(path != null && !path.equals("")){
		if(os == null || (os+"").equals("")){
			path = BaseUrl + "/" + path;
		}else {
			path = "http:////ba110.cn" + path;
		}
	}else{
		path = BaseUrl + "/" + "images/czw.png";
	}
%>

<form id="termpostForm">
	<table class="commonTable">
		<tr>
			<td rowspan="4">
				<img width="200px" height="160px" src="<%=path%>"/>
				<input type="file" name="img"/>
			</td>
		</tr>
		<tr>
			<td class="label">采集类型：</td>
			<td class="input">
				<select name="infotype">
					<%
						String infoType = bModel.get("INFOTYPE")+"";
						for(int i=0;i<infoDict.size();i++){
							String id = infoDict.get(i).get("ID")+"";
							String name = infoDict.get(i).get("NAME")+"";
							String select = id.equals(infoType)?"selected":"";
							%>
								<option <%=select %> value="<%=id %>"><%=name %></option>
							<%
						}
					%>
				</select>
			</td>
			<td class="label">楼栋类型：</td>
			<td class="input">
			
				<select name="buildingType">
					<%
						String buildType = bModel.get("BUILDING_TYPE")+"";
						for(int i=0;i<bildDict.size();i++){
							String id = bildDict.get(i).get("ID")+"";
							String name = bildDict.get(i).get("NAME")+"";
							String select = id.equals(buildType)?"selected":"";
							%>
								<option <%=select %> value="<%=id %>"><%=name %></option>
							<%
						}
					%>
				</select>
			</td>
		</tr>
		<tr>
			<td class="label">采集地址：</td><td class="input"><input name="addr" id="termpostaddr" value="${model.ADDR }"/></td>
			<td class="label">楼栋编码：</td><td class="input"><input name="buildingCode" value="${model.BUILDING_CODE }"/></td>
		</tr>
		<tr>
			<td class="label">电话号码：</td><td class="input"><input name="telno" value="${model.TELNO }"/></td>
			<td class="label">备注：</td><td class="input"><input name="note" value="${model.NOTE }"/></td>
		</tr>
		<tr>
			<td class="label" colspan="5">
				<div id="BmapDiv" style="width:770px;height:250px"></div>
			</td>
		</tr>
		<tr>
			<td class="label" colspan="5" style="text-align: center;"><button style="border: 1px solid rgb(177, 196, 245);
background-color: rgb(77, 88, 221);
width: 200px;
height: 50px;
color: rgb(211, 197, 234);
font-size: 24px;" id="submitBtn">提交</button></td>
		</tr>
	</table>
	<input type="hidden" name="id" value="${model.ID }"/>
	<input type="hidden" name="mapx" id="mapx" value="${model.MAPX }"/>
	<input type="hidden" name="mapy" id="mapy" value="${model.MAPY }"/>
</form>